<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/base/base.jsp"%>
<%@ include file="/base/database.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title>浏览请假信息</title>
<link rel="stylesheet" href="css/pintuer.css">
<link rel="stylesheet" href="css/admin.css">
<link rel="shortcut icon" href="images/logo.jpg">
<script src="js/jquery.js"></script>
<script src="js/pintuer.js"></script>

</head>

<body>

  <div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> 浏览请假信息</strong> </div>
    <div class="padding border-bottom">
      <ul class="search" style="padding-left:10px;">
       <li><select name="check" onchange="window.location=this.value">
        <option>查看学生的请假申请</option>
        <option value="leave_list.jsp">待审核</option>
        <option value="checked_leave.jsp">已审核</option>
       </select></li>
        <li style="color:blue;font-size:16px;">按请假编号搜索：</li>
      <form method="post" action="page/instructor/leave/action_searchleave.jsp">
          <input type="text" placeholder="请输入搜索关键字" name="leaveID" class="input" style="width:250px; line-height:17px;display:inline-block" value="34" />
          <input type="submit" class="panel-head" value="查询" style="font-size:15pt"></form>
      </ul>
    </div>
    <table class="table table-hover text-center">
      <tr>
      		    <th>序号</th>
				<th>请假编号</th>
				<th>课程编号</th>
				<th>请假事由</th>
				<th>天数</th>
				<th>学号</th>
				<th>请假时间</th>
				<th>审核时间</th>
				<th>审核意见</th>
				<th>可预览审核</th>
				
      </tr>
    
				
				
			
			<%  
			    request.setCharacterEncoding("utf-8");
			 
			    String  keyword=request.getParameter("keyword");
			
				StringBuffer sqlBuff = new StringBuffer();
				sqlBuff.append("select * from sys_leave where 1=1");
				String sql = sqlBuff.toString();
		
				Connection conn = getConn();
			
				PreparedStatement pstmt = conn.prepareStatement(sql);

				
				ResultSet rs = pstmt.executeQuery();
				
				int index = 1;
				
				while (rs.next()) {
					
				String leaveID=rs.getString("leaveID");
				String courseID=rs.getString("courseID");
				String reason =rs.getString("reason");
				String daynum =rs.getString("daynum");
				String stuNo=rs.getString("stuNo");
				String applytime=rs.getString("applytime");
				String audittime =rs.getString("audittime");
				String opinion =rs.getString("opinion");

		
			%>

			<tr>
				 <td><%=index++ %></td>
				 <td><%=leaveID %></td>
				<td><%=courseID %></td>
				<td><%=reason %></td>
				<td><%=daynum %></td>
				<td><%=stuNo %></td>
				<td><%=applytime %></td>
				<td><%=audittime %></td>
				<td><%=opinion %></td>
				
				<td><div class="button-group">
				 <a class="button border-main" href="<%=path%>/page/instructor/leave/leave_edit.jsp?leaveID=<%=leaveID%>"><span class="icon-edit"></span>预览</a></div></td>
			</tr>
			<%
				}
			%>
    </table>
  </div>
</body>
</html>
